package com.liuyanzhao.blog.entity;

public class Category {
    private Integer categoryId;

    private Integer categoryPid;

    private String categoryName;

    private String categoryDescription;

    private Integer categoryOrder;

    private String categoryIcon;

    private Integer categoryStatus;

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public Integer getCategoryPid() {
        return categoryPid;
    }

    public void setCategoryPid(Integer categoryPid) {
        this.categoryPid = categoryPid;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName == null ? null : categoryName.trim();
    }

    public String getCategoryDescription() {
        return categoryDescription;
    }

    public void setCategoryDescription(String categoryDescription) {
        this.categoryDescription = categoryDescription == null ? null : categoryDescription.trim();
    }

    public Integer getCategoryOrder() {
        return categoryOrder;
    }

    public void setCategoryOrder(Integer categoryOrder) {
        this.categoryOrder = categoryOrder;
    }

    public String getCategoryIcon() {
        return categoryIcon;
    }

    public void setCategoryIcon(String categoryIcon) {
        this.categoryIcon = categoryIcon == null ? null : categoryIcon.trim();
    }

    public Integer getCategoryStatus() {
        return categoryStatus;
    }

    public void setCategoryStatus(Integer categoryStatus) {
        this.categoryStatus = categoryStatus;
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((categoryDescription == null) ? 0 : categoryDescription.hashCode());
		result = prime * result + ((categoryIcon == null) ? 0 : categoryIcon.hashCode());
		result = prime * result + ((categoryId == null) ? 0 : categoryId.hashCode());
		result = prime * result + ((categoryName == null) ? 0 : categoryName.hashCode());
		result = prime * result + ((categoryOrder == null) ? 0 : categoryOrder.hashCode());
		result = prime * result + ((categoryPid == null) ? 0 : categoryPid.hashCode());
		result = prime * result + ((categoryStatus == null) ? 0 : categoryStatus.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Category other = (Category) obj;
		if (categoryDescription == null) {
			if (other.categoryDescription != null)
				return false;
		} else if (!categoryDescription.equals(other.categoryDescription))
			return false;
		if (categoryIcon == null) {
			if (other.categoryIcon != null)
				return false;
		} else if (!categoryIcon.equals(other.categoryIcon))
			return false;
		if (categoryId == null) {
			if (other.categoryId != null)
				return false;
		} else if (!categoryId.equals(other.categoryId))
			return false;
		if (categoryName == null) {
			if (other.categoryName != null)
				return false;
		} else if (!categoryName.equals(other.categoryName))
			return false;
		if (categoryOrder == null) {
			if (other.categoryOrder != null)
				return false;
		} else if (!categoryOrder.equals(other.categoryOrder))
			return false;
		if (categoryPid == null) {
			if (other.categoryPid != null)
				return false;
		} else if (!categoryPid.equals(other.categoryPid))
			return false;
		if (categoryStatus == null) {
			if (other.categoryStatus != null)
				return false;
		} else if (!categoryStatus.equals(other.categoryStatus))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Category [categoryId=" + categoryId + ", categoryPid=" + categoryPid + ", categoryName=" + categoryName
				+ ", categoryDescription=" + categoryDescription + ", categoryOrder=" + categoryOrder
				+ ", categoryIcon=" + categoryIcon + ", categoryStatus=" + categoryStatus + "]";
	}
    
    
    
}